import React, { Component } from 'react'
import { NavLink, Switch, Route} from 'react-router-dom'
import Index from './Index/index.js'
import House from './House'
import My from './My'
import News from './News'
import './index.scss'
export default class  Home extends Component {
    render() {
        return <div className="home">
          <div className="content">
              <Switch>
                  <Route exact path="/home" component={Index}></Route>
                  <Route path="/home/house" component={House}></Route>
                  <Route path="/home/news" component={News}></Route>
                  <Route path="/home/my" component={My}></Route>
              </Switch>
          </div>
          <div className="footer">
              <ul>
                  <li>
                      <NavLink exact to="/home">
                          <span className='iconfont icon-ind'></span>
                          <p>首页</p>
                      </NavLink>
                  </li>
                  <li>
                      <NavLink to="/home/house">
                          <span className='iconfont icon-findHouse'></span>
                          <p>找房</p>
                      </NavLink>
                  </li>
                  <li>
                      <NavLink to="/home/news">
                          <span className='iconfont icon-infom'></span>
                          <p>资讯</p>
                      </NavLink>
                  </li>
                  <li>
                      <NavLink to="/home/my">
                          <span className='iconfont icon-my'></span>
                          <p>我的</p>
                      </NavLink>
                  </li>
              </ul>
          </div>
        </div>
    }
}
